Make meteonorm remote_data tests robust to data changes#2810
Make meteonorm remote_data tests robust to data changes#2810maschwanden wants to merge 1 commit into
Conversation
Hey @maschwanden! 🎉Thanks for opening your first pull request! We appreciate your If AI is used for any portion of this PR, you must vet the content |
|
Hi @maschwanden, can you please add this list to your PR (before the description you worte): https://github.com/pvlib/pvlib-python/blob/main/.github/PULL_REQUEST_TEMPLATE.md?plain=1 It is just for us to follow the status of the PR more easily! Thanks! |
|
Hi @IoannisSifnaios, I intentionally left it out because most items are not relevant to my PR (It says I added it now with all entries except for the |
|
Thanks @maschwanden would you like to add yourself to the list of contributors, in this file? You can also add a note in the Testing section, but I think that's optional. |
The meteonorm iotools tests pinned specific values, the full column list, and exact column counts returned by the live API. Meteonorm regularly updates their weather dataset and adds parameters to the 'all' set, neither of which is a breaking API change, but both cause these tests to fail spuriously (e.g. new 'surface_tilt'/'surface_azimuth' columns broke the exact-list assertion). Assert only what pvlib controls, not what meteonorm's dataset controls: - realtime: check the known columns are a subset of the response and that the column count is at least as large, instead of exact equality. - training/tmy: drop the golden-value assert_frame_equal comparisons (and their fixtures); check columns, numeric dtype, and that at most 20% of values are NaN (the guarantee meteonorm provides). Row counts and index checks are kept since they are determined by the requested time range, not the dataset.
9754226 to
9d27253
Compare
|
Thanks for the review @cwhanse !
I added myself to the contributors file. Thanks for reminding me. |
docs/sphinx/source/referencefor API changes.docs/sphinx/source/whatsnewfor all changes. Includes link to the GitHub Issue with:issue:`num`or this Pull Request with:pull:`num`. Includes contributor name and/or GitHub username (link with:ghuser:`user`).remote-data) and Milestone are assigned to the Pull Request and linked Issue.@AdamRJensen asked the Meteonorm team to fix the recurring failing CI pipeline problem. In this PR we suggest a permanent fix for the problem.
The meteonorm iotools tests pinned specific values, the full column list, and exact column counts returned by the live API. Meteonorm regularly updates their weather dataset and adds parameters to the 'all' set, neither of which is a breaking API change, but both cause these tests to fail spuriously (e.g. new 'surface_tilt'/'surface_azimuth' columns broke the exact-list assertion).
Assert only what pvlib controls, not what meteonorm's dataset controls:
Row counts and index checks are kept since they are determined by the requested time range, not the dataset.